package com.ss.android.g;

import com.bytedance.common.utility.Logger;

import org.json.JSONException;
import org.json.JSONObject;

public class a {
    private static a a;

    static {
        a.a = new b();
    }

    private String b;
    private JSONObject c;

    private a(String arg1, JSONObject arg2) {

        this.b = arg1;
        this.c = arg2;
    }

    a(String arg1, JSONObject arg2, byte arg3) {
        this(arg1, arg2);
    }

    static a b() {
        return a.a;
    }

    public void a() {
        android.support.design.a.onEvent(this.b, this.c);
    }

    public static final class a$a {
        private final String a;
        private JSONObject b;

        public a$a(String arg2) {

            this.a = arg2;
            if (this.b == null) {
                this.b = new JSONObject();
            }
        }

        public final a a() {
            a v0 = android.support.design.a.isTextEmpty(this.a) ? com.ss.android.g.a.b() : new com.ss.android.g.a(this.a, this.b, (byte) 0);
            return v0;
        }

        public final a$a a(String arg2, Object arg3) {
            try {
                this.b.put(arg2, arg3);
            } catch (JSONException v0) {
                Logger.throwExceptionInDebug(((Throwable) v0));
            }

            return this;
        }
    }
}

